<?php
/*由bean脚本生成 powerBy--joe*/
namespace app\common\validate;

use app\common\bean\StoreRolePermissionBean;

class StoreRolePermissionValidate extends BaseValidate
{

	static $all = 'all';
	static $add = 'add';
	static $edit = 'edit';
	static $pkId = 'id';
	static $storeRoleId = 'store_role_id';

	public function __construct(array $rules = [], array $message = [], array $field = [])
	{
		parent::__construct($rules, $message, $field);
		$this->rule = [
			 StoreRolePermissionBean::$id => 'require', //
			 StoreRolePermissionBean::$storeRoleId => 'require', //客户角色id、
			 StoreRolePermissionBean::$storePermissionId => 'require', //客户权限id
		];
		$this->message = [
			StoreRolePermissionBean::$id.POINST."require " => 'id必须', //
			StoreRolePermissionBean::$storeRoleId.POINST."require " => 'store_role_id必须', //客户角色id、
			StoreRolePermissionBean::$storePermissionId.POINST."require " => 'store_permission_id必须', //客户权限id
		];
		$this->scene = [
			self::$all => [
				StoreRolePermissionBean::$id,
				StoreRolePermissionBean::$storeRoleId,
				StoreRolePermissionBean::$storePermissionId,
			],
			self::$add => [
			],
			self::$edit => [
			],
			self::$pkId => [],
            self::$storeRoleId => [StoreRolePermissionBean::$storeRoleId]
		];
	}


}
